package org.example.DesignPatterns.Builder;

/**
 * @description:
 * @author: farprt
 * @create: 2022-09-18 12:13
 **/
public class HouseBuilder implements Builder{

    private Building house;

    public HouseBuilder(){
        house=new Building();
    }

    public HouseBuilder(Building house) {
        this.house = house;
    }

    @Override
    public void buildBasement() {
        house.setBasement("|==========|\n");
    }

    @Override
    public void buildWall() {
        house.setWall("| 田      田 |\n");
    }

    @Override
    public void buildRoof() {
        house.setRoof("/----------\\\n");
    }

    @Override
    public Building getBuilding() {
        return house;
    }
}